<?php


namespace app\admin\validate;

use think\Validate;

class PayCard extends Validate
{
    //字段规则
    protected $rule = [
        'account_holder_name' => 'require',
        'account_no' => 'require',
        'ifsc' => 'require',
        'bank' => 'require',
        'state' => 'require',
        'min_price' => 'require',
        'max_price' => 'require',
        'branch' => 'require',
    ];

    //验证器提示信息
    protected $message = [
        'account_holder_name.require' => '账户持有人姓名',
        'account_no.require' => '账户',
        'ifsc.require' => '税号',
        'bank.require' => '银行',
        'state.require' => '州',
        'min_price.require' => '最小支付金额',
        'max_price.require' => '最大支付金额',
        'branch.require' => '分支',
    ];

    //使用场景
    protected $scene = [
        'add' => ['account_holder_name', 'account_holder_name', 'ifsc', 'bank', 'state', 'min_price', 'max_price','branch'],
        'edit' => ['account_holder_name', 'account_holder_name', 'ifsc', 'bank', 'state', 'min_price', 'max_price','branch']
    ];
}